package ru.passivemoney.subscribers.signalcollector;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.dukascopy.api.IBar;
import com.dukascopy.api.ITick;
import com.dukascopy.api.Instrument;
import com.dukascopy.api.JFException;
import com.dukascopy.api.Period;

import ru.passivemoney.strategy.AStrategy;
import ru.passivemoney.subscribers.ASubscriber;

public class BarCollector extends ASubscriber {

	public BarCollector(Instrument instrument, AStrategy strategy) {
		super(instrument, strategy);
	}

	private static final Logger logger = LoggerFactory.getLogger(BarCollector.class);
	

	@Override
	public void reactOnBar(Period period, IBar askBar, IBar bidBar) throws JFException {
		logger.info("askBar: open-{}; close-{}", new Object[]{askBar.getOpen(), askBar.getClose()});
		
	}

	@Override
	public void reactOnTick(ITick tick) {
		// do nothing
	}

}
